package com.dmzc.stage3.ThreadLocalMap;

/***
 * 测试静态内部类
 */
public class Test2 {
    public static void main(String[] args) {
        NotInner notInner = new NotInner("s");
        //会报错
        //notInner.get();
        Inner inner = new Inner("sd");
        System.out.println(inner.get());
    }

    static class Inner {
        private String news;

        public Inner(String news) {
            this.news = news;
        }

        private String get() {
            return news;
        }
    }
}

class NotInner {
    private String news;

    public NotInner(String news) {
        this.news = news;
    }

    private String get() {
        return news;
    }
}